<template>
  <div>
    <!-- 轮播图区域    通过属性绑定把父组件的lunbotu传递给子组件-->
    <swipe :lunbotu="lunbotu" :imgname="'img'" :isfull="true"></swipe>

    <div class="mui-content">
      <ul class="mui-table-view mui-grid-view mui-grid-9">
        <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
          <router-link to="/home/newslist">
            <img src="../../imgs/menu1.png" />
            <div class="mui-media-body">新闻资讯</div></router-link
          >
        </li>
        <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
          <router-link to="/home/photolist">
            <img src="../../imgs/menu2.png" />
            <div class="mui-media-body">图片分享</div></router-link
          >
        </li>
        <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
          <router-link to="/home/goodslist">
            <img src="../../imgs/menu3.png" />
            <div class="mui-media-body">商品购买</div></router-link
          >
        </li>
        <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
          <router-link to="#">
            <img src="../../imgs/menu4.png" />
            <div class="mui-media-body">留言反馈</div></router-link
          >
        </li>
        <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
          <router-link to="#">
            <img src="../../imgs/menu5.png" />
            <div class="mui-media-body">视频专区</div></router-link
          >
        </li>
        <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
          <router-link to="#">
            <img src="../../imgs/menu6.png" />
            <div class="mui-media-body">联系我们</div></router-link
          >
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
// 导入自己封装的轮播图子组件
import swipe from '../sub-components/Swipper.vue'
export default {
  data() {
    return {
      lunbotu: [],
    };
  },
  created() {
    // 页面初始化好就调用轮播图
    // this.getlunbo();
  },
  methods: {
    async getlunbo() {
      const { data } = await this.$http.get("/api/getlunbo");
      if (data.status === 0) this.lunbotu = data.message;
    },
  },
  components:{
    swipe
  }
};
</script>

<style lang="less" scoped>

// 为原始图片大小的二分之一
.mui-grid-view{
    li{
      
        img{
            width: 60px;
            height: 60px;
        }
    }
}
.mui-grid-view.mui-grid-9{
    background-color: #fff;
    border: none;
}
// 类多的优先级高  不出现就有可能是优先级不够
.mui-grid-view.mui-grid-9 .mui-table-view-cell{
      border: none;
}
.mui-table-view.mui-grid-view .mui-table-view-cell .mui-media-body{
    font-size: 12px;
    line-height: 12px;
    height: 12px;
}
</style>